<?php
require_once("Elements.php");
		
class LoginForm extends Zend_Form 
{
	public function init() 
	{	
		$this->setName('loginForm');		
		$this->setMethod('post');
		$this->setAction('login');
		$languageFile = Zend_Registry::get('languageFile');
        $translate = new Zend_Translate('array',$languageFile, 'zh_CN');
        $this->setTranslator($translate);
		
		$elements = new Elements();
		
		$element = $elements->getEmailTextField(null);
		$element->setLabel('您的注册邮箱');
		$element->setDescription(null);
		$this->addElement($element);
		$element = $elements->getPasswordTextField();
		$element->setLabel('您的密码');
		$element->setDescription(null);
		$this->addElement($element);
		
		$login = $this->createElement('submit','login');
		$login->setIgnore(true);
		//$login->removeDecorator('DtDdWrapper');
		$this->addElement($login);
		
	}
	
	/*public function loadDefaultDecorators() {
     $this->setDecorators(
         array(
             array('ViewScript', 
                 array('viewScript' => 'customize/LoginForm.phtml')
             )
          )
      );       
} 
	*/
}
